<?php
$this->breadcrumbs = array(
    'Success story' => array('index'),
    'Manage',
);
?>
<div class="box">
    <header>
        <h5>Manage Success story</h5>
    </header>
    <br>
    <div class="box">
	<?php
	$this->widget('bootstrap.widgets.TbGridView', array(
	    'id' => 'user-grid',
	    'dataProvider' => $model->searchBackend(),
	    'filter' => $model,
	    'columns' => array(
		array(
		    'header' => 'Username',
		    'name' => 'userName',
		    'type' => 'raw',
		    'value' => function($data) {
			return "<a href='" . BACKEND_SITE_URL . "user/member/update?id=" . $data->user->user_id . "'>" . $data->user->username . "</a>";
		    }
		),
		'text',
		array(
		    'header' => 'Time created',
		    'name' => 'time_created',
		    'value' => function($data) {
			return date('m-d-Y', $data->time_created);
		    }
		),
		array(
		    'class' => 'bootstrap.widgets.TbButtonColumn',
		    'template' => '{update} {delete}',
		)
	    )
	));
	?>
    </div>
</div>